import React from 'react'
import { changeNav } from '../../actions'
import { connect } from 'react-redux'
import { List,WhiteSpace,Button} from 'antd-mobile'
import hhistory from '../../history'


const Item = List.Item
const Brief = Item.Brief

class SetPage extends React.Component {

	componentDidMount(){
	    this.props.tochangeNav({title:"设置"})
	}
    LogOut() {
        sessionStorage.removeItem("TcslSlyunToken");
        sessionStorage.removeItem("loginstatus");
        hhistory.push('/')
	}
	render(){
		return(
			<div className='companyInfo'>
				<List renderHeader={() => ''}>
					<Item arrow="horizontal">
			          推送通知
			        </Item>
				</List>
				<WhiteSpace size="lg" />
				<List>
					<Item arrow="horizontal">
			          关于
			        </Item>
				</List>

				<WhiteSpace size="lg" />
				<WhiteSpace size="lg" />
				<Button onClick={this.LogOut.bind(this)}>退出登录</Button>
			</div>
		)
	}

}

const mapStateToProps = ( state ) => ({
	  
})

const mapDispatchToProps = (dispatch) => ({
	tochangeNav:navobj => dispatch( changeNav( navobj ) )
})

export default connect( mapStateToProps,mapDispatchToProps )( SetPage )